Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppresses the warning message because of partial arg match #233

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

vedhav
Copy link
Contributor

@vedhav vedhav commented Nov 17, 2023

Suppresses the warning message because of partial arg match in the checkmate::assert_names

Example app to test:

options(warnPartialMatchArgs = TRUE)
data <- teal_data()
data <- within(data, {
  library(nestcolor)
  ADSL <- teal.modules.general::rADSL
})
datanames <- c("ADSL")
datanames(data) <- datanames
join_keys(data) <- default_cdisc_join_keys[datanames]
app <- teal::init(
  data = data,
  modules = teal::modules(
    teal.modules.general::tm_a_pca(
      "PCA",
      dat = teal.transform::data_extract_spec(
        dataname = "ADSL",
        select = teal.transform::select_spec(
          choices = teal.transform::variable_choices(
            data = data[["ADSL"]], c("BMRKR1", "AGE", "EOSDY")
          ),
          selected = c("BMRKR1", "AGE"),
          multiple = TRUE
        ),
        filter = NULL
      ),
      ggplot2_args = teal.widgets::ggplot2_args(
        labs = list(subtitle = "Plot generated by PCA Module")
      )
    )
  )
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}

# Warning in checkmate::assert_names(names(rmd_yaml_args), subset = c("author",  :
#   partial argument match of 'subset' to 'subset.of'

Copy link
Contributor

badge

Code Coverage Summary

Filename              Stmts    Miss  Cover    Missing
------------------  -------  ------  -------  -----------------------------------------------------------------------------------
R/AddCardModule.R       144       2  98.61%   162, 199
R/Archiver.R             25       0  100.00%
R/ContentBlock.R         18       2  88.89%   38-44
R/DownloadModule.R      207      49  76.33%   95-101, 143, 168-173, 182-186, 189-193, 201-205, 208-212, 219-223, 226-230, 267-271
R/FileBlock.R            13       0  100.00%
R/NewpageBlock.R          2       0  100.00%
R/PictureBlock.R         30       2  93.33%   15, 79
R/Previewer.R           295      56  81.02%   188, 202, 204-207, 210, 213-221, 330-374
R/RcodeBlock.R           15       0  100.00%
R/Renderer.R            113      37  67.26%   45-60, 121, 129, 138, 140-161
R/ReportCard.R           77       4  94.81%   180, 219, 224, 245
R/Reporter.R             94       1  98.94%   254
R/ResetModule.R          55       0  100.00%
R/SimpleReporter.R       30       0  100.00%
R/TableBlock.R            9       0  100.00%
R/TextBlock.R            13       0  100.00%
R/utils.R               171      80  53.22%   7, 38-97, 99, 102-109, 163, 175-177, 287-296
R/yaml_utils.R           81       2  97.53%   41, 239
R/zzz.R                  14      10  28.57%   2-13, 19
TOTAL                  1406     245  82.57%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 500a77e

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

Unit Tests Summary

    1 files    18 suites   11s ⏱️
204 tests 204 ✔️ 0 💤 0
346 runs  346 ✔️ 0 💤 0

Results for commit 500a77e.

Copy link
Contributor

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
Archiver 💚 $3.65$ $-1.10$ $0$ $0$ $0$ $0$

Results for commit cbae153

♻️ This comment has been updated with latest results.

@vedhav
Copy link
Contributor Author

vedhav commented Nov 17, 2023

Note that a similar warning message also happens in teal inside the checkmate::asswer_class() but it's addressed in 8cba826

Warning in checkmate::assert_class(datasets, class = "FilteredData") :
  partial argument match of 'class' to 'classes'
Warning in checkmate::assert_class(datasets, class = "FilteredData") :
  partial argument match of 'class' to 'classes'

@kartikeyakirar
Copy link
Contributor

Nice job, Vedha! I didn't catch this. It becomes apparent when checking the settings with options(warnPartialMatchArgs = T).

Copy link
Contributor

@kartikeyakirar kartikeyakirar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@vedhav vedhav merged commit 24c3c20 into main Nov 17, 2023
21 checks passed
@vedhav vedhav deleted the supress_warnings@main branch November 17, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants